package io.xxx.xbutler.client;

import io.xxx.xbutler.client.request.CreateVenueRequest;
import io.xxx.xbutler.domain.FavoriteProduct;
import io.xxx.xbutler.domain.Jigsaw;
import io.xxx.xbutler.domain.Poster;
import io.xxx.xbutler.domain.RedEnvelope;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("x-promotion")
public interface PromotionClient {

    @GetMapping("/jigsaw/product/get")
    Jigsaw getProductJigsaw(@RequestParam Long storeId, @RequestParam String skuSn);

    @GetMapping("/jigsaw/venue/get")
    Jigsaw getVenueJigsaw(@RequestParam Long storeId, @RequestParam String venueCode);

    @PostMapping("/venue/create")
    Jigsaw createVenue(@RequestBody CreateVenueRequest request);

    @GetMapping("/favorite-product/list")
    List<FavoriteProduct> getFavoriteProducts(@RequestParam Long storeId);

    @GetMapping("/red-envelope/list")
    List<RedEnvelope> getRedEnvelopes(@RequestParam Long storeId);

    @GetMapping("/red-envelope/get")
    RedEnvelope getRedEnvelope(@RequestParam Long redEnvelopeId);

    @GetMapping("/poster/get")
    Poster getPoster(@RequestParam String skuSn);
}
